{layout name="layout" /}

<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">自定义变量</div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-12">
                        <a href="{:url('admin/variable/add')}" class="btn btn-success">添加</a>
                    </div>
                </div>
                <div class="table-responsive">
                    <table class="table  table-bordered table-hover">
                        <tr class="active">
                            <th><input class="check-all" type="checkbox" value=""></th>
                            <th>变量调用名称</th>
                            <th>描述</th>
                            <th>输入框类型</th>
                            <th>验证规则</th>
                            <th>操作</th>
                        </tr>
                        {volist name="$variableRows" id="variableRow"}
                        <tr>
                          <td><input class="check" type="checkbox" value="{$variableRow.key}"></td>
                          <td>
                            {$variableRow.key}
                          </td>
                          <td>{$variableRow.description}</td>
                          <td>{$variableRow.input_types}</td>
                          <td>{$variableRow.check}</td>
                          <td>
                            <a class="btn btn-xs btn-default" href="{:url('admin/variable/set',['key'=>$variableRow['key']])}">设置变量值</a>
                            <a class="btn btn-xs btn-default" href="{:url('admin/variable/edit',['key'=>$variableRow['key']])}">编辑</a>
                            <a class="btn btn-xs btn-default delete" href="{:url('admin/variable/destroy',['key'=>$variableRow['key']])}">删除</a>
                          </td>
                        </tr>
                        {/volist}
                    </table>
                </div>
            </div>
            <div class="panel-footer">
            {$pages}
            </div>
        </div>
    </div>
</div>